/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.base.entity.investorfinancialinfo;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 资方金融费率维护Entity
 * @author LV
 * @version 2021-03-03
 */
@Table(name="t_negotiated_interest", alias="a", columns={
		@Column(name="negotiated_interest_id", attrName="negotiatedInterestId", label="押汇利息ID", isPK=true),
		@Column(name="days", attrName="days", label="天数"),
		@Column(name="stage", attrName="stage", label="阶段"),
		@Column(name="investor_margin_ratio", attrName="investorMarginRatio", label="资方保证金比例"),
		@Column(name="investor_interest_ratio", attrName="investorInterestRatio", label="资方利息"),
		@Column(name="investor_overdue_interest_ratio", attrName="investorOverdueInterestRatio", label="资方超期利息"),
		@Column(name="customer_margin_ratio", attrName="customerMarginRatio", label="客户保证金比例"),
		@Column(name="customer_interest_ratio", attrName="customerInterestRatio", label="客户利息"),
		@Column(name="customer_overdue_interest_ratio", attrName="customerOverdueInterestRatio", label="客户超期利息"),
		@Column(name="stage_type", attrName="stageType", label="阶段类型", comment="阶段类型（1资方阶段 2客户阶段）"),
		@Column(name="investor_financial_info_id", attrName="investorFinancialInfoId.investorFinancialInfoId", label="资方金融信息ID"),
	}, orderBy="a.negotiated_interest_id ASC"
)
public class NegotiatedInterest extends DataEntity<NegotiatedInterest> {
	
	private static final long serialVersionUID = 1L;
	private String negotiatedInterestId;		// 押汇利息ID
	private Long days;		// 天数
	private Integer stage;		// 阶段
	private String investorMarginRatio;		// 资方保证金比例
	private String investorInterestRatio;		// 资方利息
	private String investorOverdueInterestRatio;		// 资方超期利息
	private String customerMarginRatio;		// 客户保证金比例
	private String customerInterestRatio;		// 客户利息
	private String customerOverdueInterestRatio;		// 客户超期利息
	private String stageType;		// 阶段类型（1资方阶段 2客户阶段）
	private InvestorFinancialInfo investorFinancialInfoId;		// 资方金融信息ID 父类
	
	public NegotiatedInterest() {
		this(null);
	}


	public NegotiatedInterest(InvestorFinancialInfo investorFinancialInfoId){
		this.investorFinancialInfoId = investorFinancialInfoId;
	}
	
	public String getNegotiatedInterestId() {
		return negotiatedInterestId;
	}

	public void setNegotiatedInterestId(String negotiatedInterestId) {
		this.negotiatedInterestId = negotiatedInterestId;
	}
	
	@NotNull(message="天数不能为空")
	public Long getDays() {
		return days;
	}

	public void setDays(Long days) {
		this.days = days;
	}
	
	@NotBlank(message="资方保证金比例不能为空")
	@Length(min=0, max=10, message="资方保证金比例长度不能超过 10 个字符")
	public String getInvestorMarginRatio() {
		return investorMarginRatio;
	}

	public void setInvestorMarginRatio(String investorMarginRatio) {
		this.investorMarginRatio = investorMarginRatio;
	}
	
	@NotBlank(message="资方利息不能为空")
	@Length(min=0, max=10, message="资方利息长度不能超过 10 个字符")
	public String getInvestorInterestRatio() {
		return investorInterestRatio;
	}

	public void setInvestorInterestRatio(String investorInterestRatio) {
		this.investorInterestRatio = investorInterestRatio;
	}
	
	@NotBlank(message="资方超期利息不能为空")
	@Length(min=0, max=10, message="资方超期利息长度不能超过 10 个字符")
	public String getInvestorOverdueInterestRatio() {
		return investorOverdueInterestRatio;
	}

	public void setInvestorOverdueInterestRatio(String investorOverdueInterestRatio) {
		this.investorOverdueInterestRatio = investorOverdueInterestRatio;
	}
	
	@NotBlank(message="客户保证金比例不能为空")
	@Length(min=0, max=10, message="客户保证金比例长度不能超过 10 个字符")
	public String getCustomerMarginRatio() {
		return customerMarginRatio;
	}

	public void setCustomerMarginRatio(String customerMarginRatio) {
		this.customerMarginRatio = customerMarginRatio;
	}
	
	@NotBlank(message="客户利息不能为空")
	@Length(min=0, max=10, message="客户利息长度不能超过 10 个字符")
	public String getCustomerInterestRatio() {
		return customerInterestRatio;
	}

	public void setCustomerInterestRatio(String customerInterestRatio) {
		this.customerInterestRatio = customerInterestRatio;
	}
	
	@NotBlank(message="客户超期利息不能为空")
	@Length(min=0, max=10, message="客户超期利息长度不能超过 10 个字符")
	public String getCustomerOverdueInterestRatio() {
		return customerOverdueInterestRatio;
	}

	public void setCustomerOverdueInterestRatio(String customerOverdueInterestRatio) {
		this.customerOverdueInterestRatio = customerOverdueInterestRatio;
	}
	
	@Length(min=0, max=2, message="阶段类型长度不能超过 2 个字符")
	public String getStageType() {
		return stageType;
	}

	public void setStageType(String stageType) {
		this.stageType = stageType;
	}
	
	public InvestorFinancialInfo getInvestorFinancialInfoId() {
		return investorFinancialInfoId;
	}

	public void setInvestorFinancialInfoId(InvestorFinancialInfo investorFinancialInfoId) {
		this.investorFinancialInfoId = investorFinancialInfoId;
	}

    public Integer getStage() {
        return stage;
    }

    public void setStage(Integer stage) {
        this.stage = stage;
    }
}